package com.shoppingmall.mapper;

import com.shoppingmall.model.Car;
import com.shoppingmall.model.view.CarView;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.springframework.stereotype.Repository;


import java.util.Collection;
import java.util.List;

@Repository
public interface CarMapper {
    @Insert("insert into tbl_car values (default,#{goods_id},#{user_id},#{car_count})")
    void addCar(Car car);

    List<CarView> getCarInfo(int user_id);

    Object getCarCount(Car car);

    void updateCarCount(Car car);

    void delCar(Car car);

    Collection<Object> getUserCarCount(int user_id);
}
